package Day12.成员变量;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/18 17:47
 */
public class Test02 {
    //循环实现，逆向思维考虑
    public static void main(String[] args) {
        int Day10Numbers =1;//第十天的桃子数量
        int DayNumbers = 0;//前一天桃子数量

        for (int i = 9; i > 0; i--) {
            DayNumbers = (Day10Numbers+1)*2;
            Day10Numbers = DayNumbers;

        }
        System.out.println("桃子的总数是："+DayNumbers);
    }


}

